Hashtag Commands
|
|||
|
Tuesday, October 29, 2024 12:04 PM |
||
|
#OneNote #OneMore #hashtags-are-awesome | ||
|
Hashtags
#SkipHashtags
Hashtags offer contextual references within the text of a page. Hashtags can be prefaced with either one or two hash symbols #, such as #hashtag or ##hashtag. Tags may contain letters, digits, hyphens, and underscores. Any other character will terminate the hashtag.
Single hash hashtags must not begin with a number. #a123 is valid but #1abc is not. This is to ensure OneMore differentiates between a hashtag and a numbered sequence like #1, #2, # 3, etc. If you want a tag such as #123 then use two number signs, such as ##123.
If you are a programmer and tend to have HTML Hex colors, like #FFCC00, or have C# or C++ pragma directives, like #include or #define, OneMore excludes these patterns by default. You can treat these as hashtags by checking the Treat box in Settings.
The full list of keywords OneMore excludes by default is #define|#else|#endif|#endregion|#error|#include|#if|#ifdef|#ifndef|#line|#pragma|#region|#undef.
PowerShell, Python and shell scripts use the hash symbol to start a single-line comment. If a space is not inserted immediately following the hash symbol then OneMore will pick that up as a hashtag. To tell OneMore to ignore these blocks of text, surround the text with the special hashtags markers #SkipHashtags and #KeepHashtags. These are not case-sensitive. Anything between those two markers is ignored. If only the #SkipHashtags marker is present on a page without a #KeepHashtags marker, then the remainder of the page is ignored. Notice that this section of this page is surrounded by these markers.
#KeepHashtags
Search Hashtags
Default shortcut is Alt + F9
To search for hashtags use the Search Hashtags dialog. All pages that containg the specified hashtags will be displayed. The date shows the last date the page was updated. Hover over each contextual snippet to see when that paragraph was last updated. Click the page to navigate to the top of the page. Click a contextual snippet to navigate directly to that paragraph.
As you start typing a hashtag, a list of known tags is displayed. You can enter a partial hashtag or select a tag from the list. Tags can be combined with AND or OR logical operators; AND is implied if not specified between two tags. Double ampersand, &&, is equivalent to AND, and double vertical bar, ||, is equivalent to OR. Precedence can be specified using parentheses. Use an asterisk as a wildcard; to search for "abc" and not "abcdef", terminate the tag with a period such as abc. Some valid query expressions include:
- tag
- tag tag2*
- This is equivalent to (tag AND tag2*)
- tag (#tag2 or tag3)
- This is equivalent to (tag AND (#tag2 OR tag3))
The scope box limits the search to all notebooks, the current notebook, the current section, or the current page. If there are no discovered hashtags on the current page, then that option is not included in the scope box.
Reserved Hashtags
Note the following hashtag names purposely are not preceeded with # symbols so they don't take effect on this page.
- KeepHashtags - When present on a page, following a SkipHashtags hashtag, the hashtag scanner will resume looking for hashtags on the page.
- SkipHashtags - When present on a page, the hashtag scanner will ignore all hastags until the bottom of the page or until it sees the keephasthags hashtag.
- SkipWiki - When a page title includes this tag, it will not be included in the output of the Wiki generation script /docs/Build.ps1 in the OneMore repo. This does not apply when the tag is in the page body.
Operations
The Index button will create a new page with an index of selected pages.
The Copy button will copy the selected pages to another section or notebook.
The Move button will move the selected pages to another section or notebook.
Insert Hashtags
Default shortcut is Alt + T
Inserts one or more selected tags onto the page. Tags can be inserted at the cursor, replace select content, or be appending to the tag bank at the top of the page.
Add Tag Bank
Adds an specialized outline below the page title, next to the date and time, in which you can type your own inline hashtags, or any other content. As an example, see the tag bank at the top of this page.
Remove Tag Bank
Removes the tag bank from the current page. If the tag bank has any content, you will be prompted to confirm if you want to delete the content and remove the tag bank.
#omwiki #omcommands
© 2020 Steven M Cohn. All rights reserved.
Please consider a sponsorship or one-time donation to support ongoing development
Created with OneNote.